/**
 * Project Name:DesensRuleServiceImpl
 * File Name:DesensRuleServiceImpl.java
 * Package Name:com.bwda.dsrs.businessservice.api.impl;
 * Date:2019年4月28日
 * Copyright (c) 2019, 江苏保旺达软件有限公司 All Rights Reserved.
 */
package com.bwda.dsrs.filecenter.service.impl;

import com.bwda.dsrs.base.util.Convert;
import com.bwda.dsrs.filecenter.domain.condition.desensrule.DesensRuleCondition;
import com.bwda.dsrs.filecenter.domain.po.desensrule.DesensRulePo;
import com.bwda.dsrs.filecenter.mapper.dsrs.DesensRuleMapper;
import com.bwda.dsrs.filecenter.service.DesensRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 脱敏 业务层
 *
 * @author youzhen
 * @date 2019年4月28日
 */
@Service
public class DesensRuleServiceImpl extends BaseServiceImpl<DesensRulePo, DesensRuleCondition, DesensRuleMapper> implements DesensRuleService {

    @Autowired
    private DesensRuleMapper desensRuleMapper;

    @Override
    public Integer queryId() {
        return desensRuleMapper.queryId();
    }

    @Override
    public void deleteByIds(String ids) {
        Long[] deids = Convert.toLongArray(ids);
        for (int i = 0;i<deids.length;i++){
            desensRuleMapper.deleteByIds(deids[i]);
        }
       // desensRuleMapper.deleteByIds(deids);
    }

    @Override
    public List<DesensRulePo> queryDrList() {
        return desensRuleMapper.queryDrList();
    }

    @Override
    public List<DesensRulePo> querySrtList(Integer[] id) {
        return desensRuleMapper.querySrtList(id);
    }
}